1. Field of the Invention
The present invention relates to an information processing apparatus, a processing method therefor, and a non-transitory computer-readable storage medium.
2. Description of the Related Art
A technique is known of using a background subtraction method to detect an object from an image sensed by an image sensing apparatus (for example, a camera). In the background subtraction method, a fixed camera senses a background image with no object, and stores it in advance. Then, the difference between the image input from the camera and the background image stored in advance is obtained, thereby detecting an object region based on the obtained difference.
Note that the background may change with time. For example, the brightness of the background changes depending on a change in illumination. In this case, a difference arises between the sensed image and the stored background image, and thus a background region may be erroneously detected as an object.
To avoid erroneous detection due to a change in background, there is provided a method of updating a background image based on an input image. If the input image contains an object, the object will influence the background image. To avoid this, Japanese Patent Laid-Open No. 2002-99909 has disclosed a technique for excluding a detected object region from target regions of background update processing.
Assume, however, that an object whose color and brightness are similar to those of the background passes in a series of images. In this case, since a sufficient difference does not arise between the object and the background, it is impossible to accurately detect the object similar to the background. In the method described in Japanese Patent Laid-Open No. 2002-99909, the object similar to the background is also reflected in updating the background image, and therefore, the background image changes from the original background. In this case, a background region after the object passes is erroneously detected as an object.